<template>
  <div class="app">
    <main>
      <router-view></router-view>
    </main>
    <footer>
      <router-link v-for="(item, index) in items" :key="index" :to="item.path">
        <i :class="item.icon"></i>
        <span>{{item.name}}</span>
      </router-link>
    </footer>
  </div>
</template>

<script>
export default {
  data() {
    return {
      items: [
        {
          path: "home",
          icon: "el-icon-s-home",
          name: "首页"
        }
            ,
        {
          path: "lookhouse",
          icon: "el-icon-office-building",
          name: "找房"
        },
        {
          path: "publish",
          icon: "el-icon-circle-plus-outline",
          name: "发布"
        },
        {
          path: "news",
          icon: "el-icon-chat-dot-square",
          name: "消息"
        },
        {
          path: "my",
          icon: "el-icon-user",
          name: "我的"
        }
    
       
      ]
    };
  }
};
</script>

<style lang="scss" scoped>
.app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  main {
    flex: 1;
    overflow-y: scroll;
    border-bottom: 2px solid rgb(55, 223, 186);
  }

  footer {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    height: 50px;
    display: flex;
    i {
      display: block;
      margin: 0 auto;
      text-align: center;
    }
  }
}
</style>